<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>我的博客</title>
</head>
<body>
<h3>Found {{ articleList|length }} blog{{ articleList|pluralize }}.</h3>
{% for article in articleList %}
<article>
    发表时间：{{ article.create_time|date:"Y /m /d" }}
    标题：<a href="{% url "detail" id=article.id %}">{{ article.title }}</a>
    <p>标签：<a href="{% url "search_tag" tag=article.category %}">{{ article.category|title }}</a></p>
</article>
{% empty %}
    The result is null.
{% endfor %}

{% if articleList.object_list and articleList.paginator.num_pages > 1 %}
      <div>
      <ul class="pager">
      {% if articleList.has_previous %}
        <li><a href="?p={{ articleList.previous_page_number }}">上一页</a></li>
      {% endif %}

      {% if articleList.has_next %}
        <li><a href="?p={{ articleList.next_page_number }}">下一页</a></li>
      {% endif %}
      </ul>
      </div>
    {% endif %}
</body>
</html>